//Los Santos Police Guard Bot
//------------------------------------------------------------------------------
#include <a_samp>
#include <a_npc>
//------------------------------------------------------------------------------
new Guard;
//------------------------------------------------------------------------------
public OnFilterScriptInit()
{
    print("LS Police Guard");
    ConnectNPC("[BOT]Guard","Guard");
    Guard = CreateVehicle(596, 0.0, 0.0, 5.0, 0.0, 0, 1, 5000);
    return 1;
}
//------------------------------------------------------------------------------
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC name.
        if(!strcmp(npcname, "[BOT]Guard", true)) //Checking if the NPC's name is [BOT]Guard
        {
            PutPlayerInVehicle(playerid, Guard, 0); //Putting the NPC into the vehicle we created for it.
        }
        return 1;
    }
    return 1;
}
